package controls.visu;

import gui.visu.components.ValuePanel;



import data.Constants;
import data.visu.DisplayDataList;
import data.visu.enums.E_BandTypes;


/**
 * @author Charles Perin
 * 29 mars 2011
 * LIMSI - INRIA Rennes
 * charles.perin@free.fr
 *
 */
public class BandCompareControl extends BandControl{


	private BandControl bandControler1;
	private BandControl bandControler2;

	private int mode;

	public BandCompareControl(String name, DisplayDataList displayDataList, BandControl bandControler1, BandControl bandControler2, E_BandTypes type, int mode) {
		super(name,Constants.DISPLAY_DATA_DEFAULT_COLOR,displayDataList,type);
		this.setMode(mode);

		setBandControler1(bandControler1);
		setBandControler2(bandControler2);
		setxMinView(displayDataList.getxMinView());
		setxMaxView(displayDataList.getxMaxView());
		ValuePanel valuePanel = new ValuePanel(this);
		setValuePanel(valuePanel);

		//superposition des band
		if(mode!=Constants.DISPLAY_COMPARE_SUPERPOSE)System.err.println("BandCompareControl: Seul mode possible = superposition");
		setDataSet(null);
	}



	public void setBandControler1(BandControl curveControler1) {
		this.bandControler1 = curveControler1;
	}

	public BandControl getBandControler1() {
		return bandControler1;
	}

	public void setBandControler2(BandControl bandControler2) {
		this.bandControler2 = bandControler2;
	}

	public BandControl getBandControler2() {
		return bandControler2;
	}

	public void setMode(int mode) {
		this.mode = mode;
	}

	public int getMode() {
		return mode;
	}

}
